package com.link2room.optimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/9/1.
 */
@Entity
@Table(name = "marketing_campaigns_rmtype", catalog = "")
@DynamicInsert
public class MarketingCampaignsRmtype extends BaseEntity{
    public enum MarketingCampaignsRmtype_{
        mcCode,groupRmtype,setNum,rmtypeName
    }
    /**
     * 活动代码
     */
    private String mcCode;
    /**
     * 房型代码
     */
    private String groupRmtype;
    /**
     * 设置量
     */
    private Integer setNum;
    /**
     * 房型名称
     */
    private String rmtypeName;

    @Basic
    @Column(name = "mc_code", nullable = false, length = 64)
    public String getMcCode() {
        return mcCode;
    }

    public void setMcCode(String mcCode) {
        this.mcCode = mcCode;
    }

    @Basic
    @Column(name = "group_rmtype", nullable = false, length = 16)
    public String getGroupRmtype() {
        return groupRmtype;
    }

    public void setGroupRmtype(String rmtype) {
        this.groupRmtype = rmtype;
    }

    @Basic
    @Column(name = "set_num", nullable = true)
    public Integer getSetNum() {
        return setNum;
    }

    public void setSetNum(Integer setNum) {
        this.setNum = setNum;
    }

    @Basic
    @Column(name = "rmtype_name", nullable = false, length = 32)
    public String getRmtypeName() {
        return rmtypeName;
    }

    public void setRmtypeName(String rmtypeName) {
        this.rmtypeName = rmtypeName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MarketingCampaignsRmtype that = (MarketingCampaignsRmtype) o;

        if (mcCode != null ? !mcCode.equals(that.mcCode) : that.mcCode != null) return false;
        if (groupRmtype != null ? !groupRmtype.equals(that.groupRmtype) : that.groupRmtype != null) return false;
        if (setNum != null ? !setNum.equals(that.setNum) : that.setNum != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mcCode != null ? mcCode.hashCode() : 0;
        result = 31 * result + (groupRmtype != null ? groupRmtype.hashCode() : 0);
        result = 31 * result + (setNum != null ? setNum.hashCode() : 0);
        return result;
    }


}
